<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MIME::compose()</title>
<style>
body, pre {
	font-family: Verdana;
	font-size: 10pt;
}
a {	color: blue; text-decoration: none }
a:hover { text-decoration: underline }
</style>
</head>
<body bgcolor="#f1f3f5" topmargin="10" leftmargin="14">

<pre>
<hr color="white">
MIME :: <i>array</i> <b>compose</b> ( [ <i>string</i> text [, <i>string</i> html [, <i>array</i> attach [, <i>integer</i> unique [, <i>string</i> line_end ]]]]] )
<hr>
Return ARRAY ('header' => <i>string</i> value, 'content' => <i>string</i> value).

<i>Notice:</i> Text or Html version of message must be set.

Default values are:
<i>integer</i> unique: 0
<i>string</i> line_end: CRLF [\r\n]

Example:
<table border="0" bgcolor="white">
<tr><td>
<pre><code>
// set text/plain version of message
$text = MIME::message('Text version of message.', 'text/plain');
// set text/html version of message
$html = MIME::message('&lt;b&gt;HTML&lt;/b&gt; version of &lt;u&gt;message&lt;/u&gt;.', 'text/html');
// add attachment with name 'file.txt'
$at[] = MIME::message('source file', 'text/plain', 'file.txt', 'iso-8859-1', 'base64', 'attachment');

// compose mail message in MIME format
$mess = MIME::compose($text, $html, $at);

// print result
print_r($mess);
</code></pre>
</td></tr>
</table>

<hr color="white">

See Also: <a href="message.html">MIME::message()</a>

[ <a href="mail&#116;&#111;:contact&#064;xpertmailer.com?subject=Comment MIME compose">Comments</a> ]

Last update: Thursday, August 16, 2007

<hr>
</pre>

</body>
</html>